package com.itheima.exerciseTest.method01_09.method6;
/*
   抽象动物类
   成员变量int（age年龄）、int（numOfLegs腿的个数）
   抽象方法void eat()

 */
public abstract class Animal {
    private int age;
    private int numOfLegs;

    public Animal() {
    }

    public Animal(int age, int numOfLegs) {
        this.age = age;
        this.numOfLegs = numOfLegs;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getNumOfLegs() {
        return numOfLegs;
    }

    public void setNumOfLegs(int numOfLegs) {
        this.numOfLegs = numOfLegs;
    }

    public abstract void eat();

}
